package com.zcl;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;
import org.w3c.dom.ls.LSOutput;

import java.lang.reflect.Modifier;
import java.util.Date;
import java.util.Scanner;

/**
 * @Description:
 * @author: zcl
 * @date: 2021/12/2  13:41
 */
public class StringTest {

    public static void main(String[] args) throws ClassNotFoundException {
        String greeting = "Core Technology";
        // substring
        String greeting1 = greeting.substring(1,3);
        System.out.println(greeting1);
        String all = String.join("/", "S","M","L","XL","XXL");
        System.out.println(all);
        System.out.println(all.codePointAt(5));

        //hahhaha
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < 100; i++) {
            stringBuilder.append(i);

        }
        System.out.println(stringBuilder);

        System.out.println(stringBuilder.length());

        Date dateline = new Date();

//        Scanner scanner = new Scanner(System.in);

//        (String first, String last) -> {
//            if (first.length() < last.length()) return -1;
//            else if (first.length()> last.length()) return 1;
//            else return 0;
//        }
//
//        0 -> { for (int i = 100;i >= 0;i ) System.out.println(i); }

        if (String.class == greeting.getClass()){
            System.out.println("对象类型相等");
        }

        Class<?> aClass = Class.forName("java.util.Date");
        Class<?> superclass = aClass.getSuperclass();
        String modifiers = Modifier.toString(aClass.getModifiers());
        System.out.println(modifiers);
        String a = "12";
        String b = "1"+ 2;
        System.out.println(a == b);

    }
}
